<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2018/10/8
 * Time: 11:25
 */

namespace app\api\service;


use think\Loader;
use think\Request;

Loader::import('WorkWx.callback.WXBizMsgCrypt',EXTEND_PATH);
class WorkNotify
{
    protected $encodingAesKey;
    protected $token;
    protected $corpId;

    function __construct()
    {
        $this->encodingAesKey = config('work.EncodingAESKey');
        $this->token = config('work.Token');
        $this->corpId = config('work.CorpID');
    }
    /**
     * 向企业微信返回通信标识
     * @return string
     */
    public function get(){
        $work = new Work($this->encodingAesKey, $this->token, $this->corpId);
        $sEchoStr =$work->get();
        return $sEchoStr;
    }

}